const db = require('../../../libs/db.config');

module.exports = async (id) => {
    const searchSQL = 'select commodity.content,commodity.createTime,commodity.images,commodity.pay, commodity.pID,commodity.title,user.userName,userinfo.photo, userinfo.intro, user.userID from commodity join user on commodity.userID = user.userID join userinfo on user.userID = userinfo.userID where commodity.pID = ' + id;
    return await db.query(searchSQL);
};
